package com.zhejiangzhengyuan.municipal_common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 案件表，案件是对事件来源数据以及相应处理过程和结果的包裹数据
 * </p>
 *
 * @author linju
 * @since 2019-11-22
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Case对象", description="案件表，案件是对事件来源数据以及相应处理过程和结果的包裹数据")
public class Case extends Model<Case> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "案件包裹的事件类型，关联字典条目表。注：一则案件只对应一则事件数据")
    private String type;

    @ApiModelProperty(value = "案件接收部门|科室，目前只进行单部门|科室的接收，但是存储时考虑多个部门接收情况")
    private String receiveDepartmentId;

    @ApiModelProperty(value = "案件的状态，关联字典条目表")
    private String status;

    @ApiModelProperty(value = "案件的的处理意见")
    private String advice;

    @ApiModelProperty(value = "案件的的等级")
    private String grade;

    @ApiModelProperty(value = "案件的的描述")
    @NotBlank
    private  String caseDescribe;

    @ApiModelProperty(value = "记录创建时间")
    private Timestamp createTime;

    @ApiModelProperty(value = "记录更新时间")
    private Timestamp updateTime;

    @ApiModelProperty(value = "案件发生位置")
    private String location;

    @ApiModelProperty(value = "新建案件的类型，道路或者桥梁")
    private String caseType;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
